import os
from build_algorithm import get_images



if __name__ == '__main__':
    imgs = get_images('docker images |grep "alg"')
    for img in imgs:
        os.system('docker tag %s:%s swr.cn-east-3.myhuaweicloud.com/test-ascendhub/%s:%s' % (img.name, img.tag, img.name.split('/')[-1], img.tag))
        os.system("docker push swr.cn-east-3.myhuaweicloud.com/test-ascendhub/%s:%s" % (img.name.split('/')[-1], img.tag))
